import services from '@/services';
const state = {

}

const mutations = {

}

const actions = {
  //新增博客
  async submitBlog(store, params) {
    const {
      data
    } = await services.blog.submitBlog(params);
    return data;
  },
  //博客栏目
  async blogTree(store, params) {
    const {
      data
    } = await services.blog.blogTree(params);
    return data;
  },
  //博客列表
  async blogList(store, params) {
    const {
      data
    } = await services.blog.blogList(params);
    return data;
  },
  //博客详情
  async blogInfo(store, params) {
    const {
      data
    } = await services.blog.blogInfo(params);
    return data;
  },
  //是否点赞过文章
  async isthumbsUp(store, params) {
    const {
      data
    } = await services.blog.isthumbsUp(params);
    return data;
  },
  //点赞文章
  async thumbsUp(store, params) {
    const {
      data
    } = await services.blog.thumbsUp(params);
    return data;
  },
  //文章评论列表
  async commentList(store, params) {
    const {
      data
    } = await services.blog.commentList(params);
    return data;
  },
  //文章评论
  async comment(store, params) {
    const {
      data
    } = await services.blog.comment(params);
    return data;
  },
  //删除文章评论
  async delComment(store, params) {
    const {
      data
    } = await services.blog.delComment(params);
    return data;
  },
}

const getters = {

}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
}
